package com.imust.test.manager;

import com.imust.test.Check;

import javax.swing.*;
import java.awt.*;


public class Signup extends JFrame {
    private static Check ll =null;
    private static ManagerCheck aa =null;
    public static void signup() {

        JFrame frame1 = new JFrame("管理员登录");
        frame1.setSize(new Dimension(300, 200));
        frame1.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
        frame1.setLayout(null);
        frame1.setLocationRelativeTo(null);
        frame1.setResizable(false);
        //frame1.setAlwaysOnTop(true);
        // 创建文本框对象
        JLabel text = new JLabel("请输入管理员账号密码：");
        text.setFont(new Font("微软雅黑",0,13));
        text.setBounds(70,10,200,30);

        JLabel text_zh = new JLabel("账号:");
        text_zh.setFont(new Font("微软雅黑",0,13));
        text_zh.setBounds(60,50,200,30);

        JLabel text_mm = new JLabel("密码:");
        text_mm.setFont(new Font("微软雅黑",0,13));
        text_mm.setBounds(60,80,200,30);

        JTextField textField = new JTextField();
        textField.setBounds(100, 50, 125, 25);

        JPasswordField password = new JPasswordField();
        password.setBounds(100, 80, 125, 25);
        aa = new ManagerCheck(textField, password, frame1);

        JButton btn_ok = new JButton("确定");
        btn_ok.setFont(new Font("微软雅黑",0,13));
        btn_ok.setBounds(110, 120, 80, 25);
        btn_ok.addActionListener(aa);
        // 将文本框添加到窗口中
        frame1.add(text);
        frame1.add(text_zh);
        frame1.add(text_mm);
        frame1.add(textField);
        frame1.add(password);
        frame1.add(btn_ok);
        frame1.setVisible(true);

    }
    public static void main(String[] args) {
        new Signup();
    }
}
